Release 10.1A: OpenEdge Development:
Programming Interfaces


Status messages

A status message is a string of text that appears in the status area of a window and describes the function of the field-level object that has input focus.

Notes: The status area is an optional feature of an OpenEdge application window. It displays one line of message text at the bottom of the window. Its appearance is controlled by the STATUS-AREA attribute. Thus, if the STATUS-AREA is disabled on a window, no help message appears. While a dialog box does not have a status area, help strings defined for fields on a dialog box are displayed in the status area of its parent window.

Also, when you use the HELP attribute to display help text for a widget, Progress overwrites any status text (defined with the STATUS statement) with the HELP text.

Status messages are a good way to provide cursory information about a database field or a field-level object in your application.

OpenEdge provides the ability to associate status messages with database fields and those field-level objects that can receive input focus. These messages are easy to implement and produce a preliminary level of help for your application. When the user tabs through certain field-level objects (fill-in fields, buttons, combo boxes, selection lists, editors, toggle boxes, radio sets, and sliders) that are enabled for input on an application interface, OpenEdge displays help text in the status area of the current window, as shown in Figure 10–1.

Figure 10–1: Status bar message for a field-level object

There are three methods for creating help text in the status area:

The next three sections discuss these methods for creating help text.

Associating help text with database fields

By default, a data representation object associated with a database field displays the help text defined for that database field. You can define and store a default help string as part of the schema definition of a database field using the Data Dictionary. Creating help strings in the database schema provides a centralized location for help strings and makes them easy to maintain.

To define help text in a database field’s schema definition:

  1. Connect to your application database, for example, sports2000.
  2. In the Data Dictionary, select a database table (for example, Customer) then choose the Fields button .
  3. Double-click a database field, for example, Name. The Field Properties dialog box appears:
  4. In the Help Text field, type the text string you want to associate with the database field, then choose OK.

You can then run a test program to view the message in the status area. For example, you can open the Procedure Editor and run the following program:

FOR EACH customer FIELDS (name): 
   UPDATE name WITH 1 DOWN. 
END. 

You can then run this program to see your help text shown in the status area of the running window, as shown in Figure 10–2.

Figure 10–2: Sample database field help text in the status area of a window

Note: Make sure that the test program involves an update to the database field. A program that just displays the field does not show the help message in the status area.

Specifying help text with the Progress 4GL

The alternative to associating help strings with database fields is to define help strings as a part of field-level objects that contain the data. To attach a help string to a field-level object, use the HELP option of the Format phrase specified with the following 4GL statements: DEFINE BROWSE, DEFINE TEMP-TABLE, DEFINE FRAME, ENABLE, FORM, PROMPT-FOR, SET, or UPDATE. The following code shows an example using the DEFINE FRAME statement:

DEFINE FRAME FRAME-A 
   BUTTON-1 AT ROW 4 COL 12
      HELP "Choose to cancel the operation and exit."
   WITH 1 DOWN NO-BOX OVERLAY SIDE-LABELS
      AT COL 1 ROW 1
      SIZE 74 BY 11. 

You can also use the HELP attribute to define help strings for field-level objects. For example, after the DEFINE FRAME statement, you can use the following code to change the help text for the button:

BUTTON-1:HELP = "This button cancels the operation and exits the window." 

In Progress, the Format phrase HELP option and the HELP attribute let you define help strings for widgets not associated with database fields. Help strings defined with these options override any help strings specified for associated database fields in the Data Dictionary. For more information, see the Format Phrase and the HELP attribute reference entries in OpenEdge Development: Progress 4GL Reference .

Defining help text with the AppBuilder

Within the AppBuilder, you can specify a help string for a field-level object in its Advanced Properties dialog box.

To define help text for a field-level object in the AppBuilder:

  1. Open your window (.w) file in the AppBuilder.
  2. Note: Make sure that the status area of your window is enabled. To check this option, select the design window’s title bar then choose the Object Properties button from the AppBuilder toolbar. The property sheet for the window appears. Verify the Status-Area option is checked.

  3. Double-click on a field-level object, such as a button. The property sheet for the object appears.
  4. Choose the Advanced button in the property sheet. The Advanced Properties dialog box appears.
  5. Type a help message in the Help field. For example, for a Cancel button message you could type: Cancel the operation and exit:
  6. Choose OK to close the Advanced Properties dialog box.
  7. Choose OK again to close the property sheet.
  8. Save the window. The help string that you typed in the Advanced Properties dialog box becomes part of a HELP option of a FORMAT phrase in the DEFINE FRAME statement generated by the AppBuilder.
  9. Run the window and select the object (in this example, the Cancel button). The help text appears in the status area of the window:

Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095